<html lang="en">
<head>
    <meta charset="UTF-8">
    <link href="//cdn.bootcss.com/element-ui/1.4.0/theme-default/index.css" rel="stylesheet">
    <link href="resourceInfo.css" rel="stylesheet">
</head>
<body>
<script src="//cdn.bootcss.com/vue/2.2.2/vue.min.js"></script>
<script src="https://cdn.bootcss.com/axios/0.16.2/axios.min.js"></script>
<script src="//cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<script src="//cdn.bootcss.com/element-ui/1.4.0/index.js"></script>
<script src="/framework/lib/common.js"></script>
<div id="app"> <!--style="margin-top: 20px"-->
    <template>
        <el-form ref="form" :model="form" label-width="120px">
            <el-row>
                <el-col :span="11" :offset="1">
                    <el-form-item label="标题">
                        <el-input v-model="form.name"  placeholder="资源名称，用来显示"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="11">
                    <el-form-item label="父code">
                        <input :value="form.id" type="hidden"></input>
                        <el-input v-model="form.parentId"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="11" :offset="1">
                    <el-form-item label="状态">
                        <el-select v-model="form.status" placeholder="可用性" clearable >
                            <el-option label="请选择" value="-1"></el-option>
                            <el-option label="禁用" value="0"></el-option>
                            <el-option label="启用" value="1"></el-option>
                        </el-select>
                    </el-form-item>
                </el-col>
                <el-col :span="11">
                    <el-form-item label="图标">
                        <el-input v-model="form.icon"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="11" :offset="1">
                    <el-form-item label="类型">
                        <el-select v-model="form.category" placeholder="请选择类型" clearable >
                            <el-option label="菜单项" value="menu"></el-option>
                            <el-option label="访问地址" value="url"></el-option>
                            <el-option label="按钮" value="button"></el-option>
                        </el-select>
                    </el-form-item>
                </el-col>
                <el-col :span="11">
                    <el-form-item label="permission">
                        <el-input type="text" v-model="form.permission"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="22" :offset="1">
                    <el-form-item label="链接">
                        <el-input type="text" v-model="form.url"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="22" :offset="1">
                    <el-form-item label="节点描述">
                        <el-input type="textarea" v-model="form.description"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="6" :offset="8">
                    <el-form-item>
                        <el-button type="primary" @click="onSubmit" size="large">保存</el-button>
                        <el-button @click="onCancel">取消</el-button>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
    </template>
</div>
<script src="resourceInfo.js"></script>
</body>
</html>